\(\int \frac {\sqrt {c+d \tan (e+f x)}}{(a+i a \tan (e+f x))^{3/2}} \, dx\) [1141]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [F(-2)]
   Giac [F(-2)]
   Mupad [F(-1)]

Optimal result

Integrand size = 32, antiderivative size = 177 \[ \int \frac {\sqrt {c+d \tan (e+f x)}}{(a+i a \tan (e+f x))^{3/2}} \, dx=-\frac {i \sqrt {c-i d} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {a} \sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d} \sqrt {a+i a \tan (e+f x)}}\right )}{2 \sqrt {2} a^{3/2} f}+\frac {i \sqrt {c+d \tan (e+f x)}}{2 a f \sqrt {a+i a \tan (e+f x)}}-\frac {(c+d \tan (e+f x))^{3/2}}{3 (i c-d) f (a+i a \tan (e+f x))^{3/2}} \]

[Out]

-1/4*I*arctanh(2^(1/2)*a^(1/2)*(c+d*tan(f*x+e))^(1/2)/(c-I*d)^(1/2)/(a+I*a*tan(f*x+e))^(1/2))*(c-I*d)^(1/2)/a^
(3/2)/f*2^(1/2)+1/2*I*(c+d*tan(f*x+e))^(1/2)/a/f/(a+I*a*tan(f*x+e))^(1/2)-1/3*(c+d*tan(f*x+e))^(3/2)/(I*c-d)/f
/(a+I*a*tan(f*x+e))^(3/2)

Rubi [A] (verified)

Time = 0.37 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3628, 3627, 3625, 214} \[ \int \frac {\sqrt {c+d \tan (e+f x)}}{(a+i a \tan (e+f x))^{3/2}} \, dx=-\frac {i \sqrt {c-i d} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {a} \sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d} \sqrt {a+i a \tan (e+f x)}}\right )}{2 \sqrt {2} a^{3/2} f}-\frac {(c+d \tan (e+f x))^{3/2}}{3 f (-d+i c) (a+i a \tan (e+f x))^{3/2}}+\frac {i \sqrt {c+d \tan (e+f x)}}{2 a f \sqrt {a+i a \tan (e+f x)}} \]

[In]

Int[Sqrt[c + d*Tan[e + f*x]]/(a + I*a*Tan[e + f*x])^(3/2),x]

[Out]

((-1/2*I)*Sqrt[c - I*d]*ArcTanh[(Sqrt[2]*Sqrt[a]*Sqrt[c + d*Tan[e + f*x]])/(Sqrt[c - I*d]*Sqrt[a + I*a*Tan[e +
 f*x]])])/(Sqrt[2]*a^(3/2)*f) + ((I/2)*Sqrt[c + d*Tan[e + f*x]])/(a*f*Sqrt[a + I*a*Tan[e + f*x]]) - (c + d*Tan
[e + f*x])^(3/2)/(3*(I*c - d)*f*(a + I*a*Tan[e + f*x])^(3/2))

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 3625

Int[Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]]/Sqrt[(c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[
-2*a*(b/f), Subst[Int[1/(a*c - b*d - 2*a^2*x^2), x], x, Sqrt[c + d*Tan[e + f*x]]/Sqrt[a + b*Tan[e + f*x]]], x]
 /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]

Rule 3627

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim
p[a*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^n/(2*b*f*m)), x] - Dist[(a*c - b*d)/(2*b^2), Int[(a + b*Tan[e
 + f*x])^(m + 1)*(c + d*Tan[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] &&
EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && EqQ[m + n, 0] && LeQ[m, -2^(-1)]

Rule 3628

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim
p[a*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^(n + 1)/(2*f*m*(b*c - a*d))), x] + Dist[1/(2*a), Int[(a + b*T
an[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && Eq
Q[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && EqQ[m + n + 1, 0] && LtQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = -\frac {(c+d \tan (e+f x))^{3/2}}{3 (i c-d) f (a+i a \tan (e+f x))^{3/2}}+\frac {\int \frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {a+i a \tan (e+f x)}} \, dx}{2 a} \\ & = \frac {i \sqrt {c+d \tan (e+f x)}}{2 a f \sqrt {a+i a \tan (e+f x)}}-\frac {(c+d \tan (e+f x))^{3/2}}{3 (i c-d) f (a+i a \tan (e+f x))^{3/2}}+\frac {(c-i d) \int \frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}} \, dx}{4 a^2} \\ & = \frac {i \sqrt {c+d \tan (e+f x)}}{2 a f \sqrt {a+i a \tan (e+f x)}}-\frac {(c+d \tan (e+f x))^{3/2}}{3 (i c-d) f (a+i a \tan (e+f x))^{3/2}}-\frac {(i c+d) \text {Subst}\left (\int \frac {1}{a c-i a d-2 a^2 x^2} \, dx,x,\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {a+i a \tan (e+f x)}}\right )}{2 f} \\ & = -\frac {i \sqrt {c-i d} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {a} \sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d} \sqrt {a+i a \tan (e+f x)}}\right )}{2 \sqrt {2} a^{3/2} f}+\frac {i \sqrt {c+d \tan (e+f x)}}{2 a f \sqrt {a+i a \tan (e+f x)}}-\frac {(c+d \tan (e+f x))^{3/2}}{3 (i c-d) f (a+i a \tan (e+f x))^{3/2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.77 (sec) , antiderivative size = 175, normalized size of antiderivative = 0.99 \[ \int \frac {\sqrt {c+d \tan (e+f x)}}{(a+i a \tan (e+f x))^{3/2}} \, dx=\frac {-\frac {3 i \sqrt {2} \left (c^2+d^2\right ) \arctan \left (\frac {\sqrt {-a (c-i d)} \sqrt {a+i a \tan (e+f x)}}{\sqrt {2} a \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {-a (c-i d)}}+\frac {2 (5 c+3 i d+(3 i c-d) \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}{(-i+\tan (e+f x)) \sqrt {a+i a \tan (e+f x)}}}{12 a (c+i d) f} \]

[In]

Integrate[Sqrt[c + d*Tan[e + f*x]]/(a + I*a*Tan[e + f*x])^(3/2),x]

[Out]

(((-3*I)*Sqrt[2]*(c^2 + d^2)*ArcTan[(Sqrt[-(a*(c - I*d))]*Sqrt[a + I*a*Tan[e + f*x]])/(Sqrt[2]*a*Sqrt[c + d*Ta
n[e + f*x]])])/Sqrt[-(a*(c - I*d))] + (2*(5*c + (3*I)*d + ((3*I)*c - d)*Tan[e + f*x])*Sqrt[c + d*Tan[e + f*x]]
)/((-I + Tan[e + f*x])*Sqrt[a + I*a*Tan[e + f*x]]))/(12*a*(c + I*d)*f)

Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1179 vs. \(2 (139 ) = 278\).

Time = 1.11 (sec) , antiderivative size = 1180, normalized size of antiderivative = 6.67

method result size
derivativedivides \(\text {Expression too large to display}\) \(1180\)
default \(\text {Expression too large to display}\) \(1180\)

[In]

int((c+d*tan(f*x+e))^(1/2)/(a+I*a*tan(f*x+e))^(3/2),x,method=_RETURNVERBOSE)

[Out]

1/24/f*(c+d*tan(f*x+e))^(1/2)*(a*(1+I*tan(f*x+e)))^(1/2)/a^2*(20*I*c*(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/
2)+9*I*2^(1/2)*(-a*(I*d-c))^(1/2)*ln((3*a*c+I*a*tan(f*x+e)*c-I*a*d+3*a*d*tan(f*x+e)+2*2^(1/2)*(-a*(I*d-c))^(1/
2)*(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/2))/(tan(f*x+e)+I))*c*tan(f*x+e)^2-3*2^(1/2)*(-a*(I*d-c))^(1/2)*ln
((3*a*c+I*a*tan(f*x+e)*c-I*a*d+3*a*d*tan(f*x+e)+2*2^(1/2)*(-a*(I*d-c))^(1/2)*(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+
e)))^(1/2))/(tan(f*x+e)+I))*c*tan(f*x+e)^3+9*I*2^(1/2)*(-a*(I*d-c))^(1/2)*ln((3*a*c+I*a*tan(f*x+e)*c-I*a*d+3*a
*d*tan(f*x+e)+2*2^(1/2)*(-a*(I*d-c))^(1/2)*(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/2))/(tan(f*x+e)+I))*d*tan(
f*x+e)-9*2^(1/2)*(-a*(I*d-c))^(1/2)*ln((3*a*c+I*a*tan(f*x+e)*c-I*a*d+3*a*d*tan(f*x+e)+2*2^(1/2)*(-a*(I*d-c))^(
1/2)*(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/2))/(tan(f*x+e)+I))*d*tan(f*x+e)^2+4*(a*(1+I*tan(f*x+e))*(c+d*ta
n(f*x+e)))^(1/2)*d*tan(f*x+e)^2-16*I*(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/2)*d*tan(f*x+e)+9*2^(1/2)*(-a*(I
*d-c))^(1/2)*ln((3*a*c+I*a*tan(f*x+e)*c-I*a*d+3*a*d*tan(f*x+e)+2*2^(1/2)*(-a*(I*d-c))^(1/2)*(a*(1+I*tan(f*x+e)
)*(c+d*tan(f*x+e)))^(1/2))/(tan(f*x+e)+I))*c*tan(f*x+e)-32*c*(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/2)*tan(f
*x+e)-3*I*2^(1/2)*(-a*(I*d-c))^(1/2)*ln((3*a*c+I*a*tan(f*x+e)*c-I*a*d+3*a*d*tan(f*x+e)+2*2^(1/2)*(-a*(I*d-c))^
(1/2)*(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/2))/(tan(f*x+e)+I))*c+3*2^(1/2)*(-a*(I*d-c))^(1/2)*ln((3*a*c+I*
a*tan(f*x+e)*c-I*a*d+3*a*d*tan(f*x+e)+2*2^(1/2)*(-a*(I*d-c))^(1/2)*(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/2)
)/(tan(f*x+e)+I))*d-12*I*c*(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/2)*tan(f*x+e)^2-3*I*2^(1/2)*(-a*(I*d-c))^(
1/2)*ln((3*a*c+I*a*tan(f*x+e)*c-I*a*d+3*a*d*tan(f*x+e)+2*2^(1/2)*(-a*(I*d-c))^(1/2)*(a*(1+I*tan(f*x+e))*(c+d*t
an(f*x+e)))^(1/2))/(tan(f*x+e)+I))*d*tan(f*x+e)^3-12*(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/2)*d)/(a*(1+I*ta
n(f*x+e))*(c+d*tan(f*x+e)))^(1/2)/(I*c-d)/(-tan(f*x+e)+I)^3

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 419 vs. \(2 (131) = 262\).

Time = 0.27 (sec) , antiderivative size = 419, normalized size of antiderivative = 2.37 \[ \int \frac {\sqrt {c+d \tan (e+f x)}}{(a+i a \tan (e+f x))^{3/2}} \, dx=\frac {{\left (3 \, \sqrt {\frac {1}{2}} {\left (i \, a^{2} c - a^{2} d\right )} f \sqrt {-\frac {c - i \, d}{a^{3} f^{2}}} e^{\left (3 i \, f x + 3 i \, e\right )} \log \left (2 i \, \sqrt {\frac {1}{2}} a^{2} f \sqrt {-\frac {c - i \, d}{a^{3} f^{2}}} e^{\left (i \, f x + i \, e\right )} + \sqrt {2} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} {\left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}\right ) + 3 \, \sqrt {\frac {1}{2}} {\left (-i \, a^{2} c + a^{2} d\right )} f \sqrt {-\frac {c - i \, d}{a^{3} f^{2}}} e^{\left (3 i \, f x + 3 i \, e\right )} \log \left (-2 i \, \sqrt {\frac {1}{2}} a^{2} f \sqrt {-\frac {c - i \, d}{a^{3} f^{2}}} e^{\left (i \, f x + i \, e\right )} + \sqrt {2} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} {\left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}\right ) - \sqrt {2} {\left (2 \, {\left (2 \, c + i \, d\right )} e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (5 \, c + 3 i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-3 i \, f x - 3 i \, e\right )}}{12 \, {\left (i \, a^{2} c - a^{2} d\right )} f} \]

[In]

integrate((c+d*tan(f*x+e))^(1/2)/(a+I*a*tan(f*x+e))^(3/2),x, algorithm="fricas")

[Out]

1/12*(3*sqrt(1/2)*(I*a^2*c - a^2*d)*f*sqrt(-(c - I*d)/(a^3*f^2))*e^(3*I*f*x + 3*I*e)*log(2*I*sqrt(1/2)*a^2*f*s
qrt(-(c - I*d)/(a^3*f^2))*e^(I*f*x + I*e) + sqrt(2)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x
 + 2*I*e) + 1))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 1))*(e^(2*I*f*x + 2*I*e) + 1)) + 3*sqrt(1/2)*(-I*a^2*c + a^2*d)*
f*sqrt(-(c - I*d)/(a^3*f^2))*e^(3*I*f*x + 3*I*e)*log(-2*I*sqrt(1/2)*a^2*f*sqrt(-(c - I*d)/(a^3*f^2))*e^(I*f*x
+ I*e) + sqrt(2)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(a/(e^(2*I*f*x
+ 2*I*e) + 1))*(e^(2*I*f*x + 2*I*e) + 1)) - sqrt(2)*(2*(2*c + I*d)*e^(4*I*f*x + 4*I*e) + (5*c + 3*I*d)*e^(2*I*
f*x + 2*I*e) + c + I*d)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(a/(e^(2
*I*f*x + 2*I*e) + 1)))*e^(-3*I*f*x - 3*I*e)/((I*a^2*c - a^2*d)*f)

Sympy [F]

\[ \int \frac {\sqrt {c+d \tan (e+f x)}}{(a+i a \tan (e+f x))^{3/2}} \, dx=\int \frac {\sqrt {c + d \tan {\left (e + f x \right )}}}{\left (i a \left (\tan {\left (e + f x \right )} - i\right )\right )^{\frac {3}{2}}}\, dx \]

[In]

integrate((c+d*tan(f*x+e))**(1/2)/(a+I*a*tan(f*x+e))**(3/2),x)

[Out]

Integral(sqrt(c + d*tan(e + f*x))/(I*a*(tan(e + f*x) - I))**(3/2), x)

Maxima [F(-2)]

Exception generated. \[ \int \frac {\sqrt {c+d \tan (e+f x)}}{(a+i a \tan (e+f x))^{3/2}} \, dx=\text {Exception raised: RuntimeError} \]

[In]

integrate((c+d*tan(f*x+e))^(1/2)/(a+I*a*tan(f*x+e))^(3/2),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: THROW: The catch RAT-ERR is undefined.

Giac [F(-2)]

Exception generated. \[ \int \frac {\sqrt {c+d \tan (e+f x)}}{(a+i a \tan (e+f x))^{3/2}} \, dx=\text {Exception raised: TypeError} \]

[In]

integrate((c+d*tan(f*x+e))^(1/2)/(a+I*a*tan(f*x+e))^(3/2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> an error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Non regular value [0,0] was discarded and replaced randomly by 0=[99,60]Warning, replacing 99 by 97, a subs
titution va

Mupad [F(-1)]

Timed out. \[ \int \frac {\sqrt {c+d \tan (e+f x)}}{(a+i a \tan (e+f x))^{3/2}} \, dx=\int \frac {\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}}{{\left (a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{3/2}} \,d x \]

[In]

int((c + d*tan(e + f*x))^(1/2)/(a + a*tan(e + f*x)*1i)^(3/2),x)

[Out]

int((c + d*tan(e + f*x))^(1/2)/(a + a*tan(e + f*x)*1i)^(3/2), x)